<template>
  <div class="app">
    <div class="imgbox">
      <img src="@/assets/images/logo.png" />
    </div>
    <div class="btnbox">
      <div class="phone"></div>
      <van-button round block @click="loginto('/applogin')" class="btn1">
        一键登录/注册
      </van-button>
      <van-button round block @click="loginto('/applogin')" class="btn2">
        使用其他手机号登录
      </van-button>
    </div>
    <div class="bottom">
      <div v-html="otherLoginMethods" class="others"></div>
      <img
        src=""
        alt=""
      />
    </div>
  </div>
</template>

<script>
import { useStore } from "@/store/index.js";
export default {
  data() {
    return {
      otherLoginMethods: '<div class="others">—&nbsp;其它登录方式&nbsp;—</div>',
      checked: false,
    };
  },
  methods: {
    loginto(value) {
      this.$router.push(value);
    },
  },
  mounted() {
    const store = useStore();
    const userinfo = store.getUserStoreinfo;
    if (userinfo != null && userinfo != undefined) {
      this.$router.push("/homepage");
    }
  },
};
</script>

<style scoped>
.app {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(to bottom, white, #99c6fa);
}
.imgbox {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: auto;
  overflow: hidden;
}
.imgbox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.btnbox {
  position: fixed;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.btnbox * {
  margin: 5px;
  height: 180px;
  width: 100%;
}

.phone {
  font-size: 26px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.btn1 {
  background-color: #5f94fe;
  color: white;
  letter-spacing: 1px;
  font-size: 18px;
}
.btn2 {
  background-color: white;
  color: #747474;
  letter-spacing: 1px;
  font-size: 18px;
}
.bottom {
  position: fixed;
  bottom: 30px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 13px;
}

.bottom img {
  position: relative;
  bottom: unset;
  left: unset;
  transform: unset;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 10px;
}
</style>
<style>
.bottom .others .van-checkbox__icon .van-icon {
  border: 1px solid rgb(77, 77, 77);
}
</style>